package readinglist;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * Created by maojianfeng on 9/27/16.
 */
@Configuration
public class StartConfig extends WebMvcConfigurerAdapter{
    private static Logger logger = Logger.getLogger(StartConfig.class);
    @Autowired
    Environment env;

//    @Bean
//    public AgentStarter agentStarter(){
//        logger.info("== AgentStarter ==");
//        AgentStarter agentStarter = new AgentStarter();
//        agentStarter.setApp_id(env.getProperty("app_id"));
//        agentStarter.setBusiresource_path(env.getProperty("busiresource"));
//        agentStarter.setService_tag(env.getProperty("service_tag"));
//        agentStarter.setService_token(env.getProperty("service_token"));
//        return agentStarter;
//    }
//    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(new CommonIamInterceptor()).addPathPatterns("/**");
//    }

}
